<?php

namespace app\api\validate;

use think\exception\ValidateException;
use think\Validate;

class BaseValidate extends Validate
{
    public function goCheck($data, $scene = '')
    {
        $res = $this->scene($scene)->check($data);
        if (!$res) {
            throw new ValidateException($this->getError());
        }
    }
}
